package com.interest.controller.builder;

import org.springframework.web.servlet.ModelAndView;

import java.util.Map;

/**
 * Created by yangfeng on 16-11-10.
 */
public abstract class ModelAndViewBuilder {
    public ModelAndView build() {
        return new ModelAndView(getViewName(), getDataMap());
    }

    protected abstract Map<String,?> getDataMap();
    protected abstract String getViewName();
}